package com.blb.community_admin.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blb.community_admin.entity.ZyVisitor;
import com.blb.community_admin.entity.vo.VisitorVO;
import com.blb.community_admin.mapper.ZyVisitorMapper;
import com.blb.community_admin.service.IZyVisitorService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;


@Service
public class ZyVisitorServiceImpl extends ServiceImpl<ZyVisitorMapper, ZyVisitor> implements IZyVisitorService {
    @Resource
    private ZyVisitorMapper zyVisitorMapper;


    @Override
    public IPage<ZyVisitor> selectVisitorPage(Integer current,Integer size,ZyVisitor zyVisitor) {

        IPage<ZyVisitor> zyVisitors =zyVisitorMapper.selectAllZyVisitorPage(new Page<>(current,size),zyVisitor);

        return zyVisitors;
    }

    @Override
    public List<ZyVisitor> selectById(ArrayList<String> visitorid) {
        ZyVisitor zyVisitor = zyVisitorMapper.selectById(visitorid);
        List<ZyVisitor> list = new ArrayList<>();
        list.add(zyVisitor);
        return list;
    }
}
